//
//  Node.h
//  RoutingEvaluator
//
//  Created by Christopher Kemsley on 4/12/12.
//  Copyright (c) 2012 iAppolopolis. All rights reserved.
//

#include <vector>
#include <string>
#import "Types.hpp"
#import "Object.hpp"

NamespaceBegin



class	NodeInfo ;
class	NodeInfoSet ;



class	NodeInfo : public Object
{
public:
	static NodeInfo*	createNode	( Identifier const & inID , Vector2D const & inPoint ) ;
	
	
	Float64		distanceFromNode	( NodeInfo const * info ) const ;
	
	Identifier const 	identifier ;
	Vector2D const		location ;
	
	
private:
	friend class NodeInfoSet ;
	NodeInfo ( Identifier const & inID , Vector2D const & inPoint ) ;
	
	// Defined but not declared to forcefully disable
	NodeInfo ( NodeInfo const & c ) ;
	NodeInfo& operator= (NodeInfo const& c ) ;
} ;



class	NodeInfoSet : public Object
{
public:
	static NodeInfoSet*		createDefaultNodeSet () ;
	static NodeInfoSet*		createWithContentsOfFile ( std::string const & path ) ;
	
	
	NodeInfo*	nodeWithIdentifier	( Identifier const & identifier ) ;
	
	
	std::vector<NodeInfo*> const&	nodes () ;
	
private:
	std::vector<NodeInfo*>	mNodes ;
	
	NodeInfoSet ( std::vector<NodeInfo*> const & infos ) ;
	
	// Defined but not declared to forcefully disable
	NodeInfoSet ( NodeInfoSet const & c ) ;
	NodeInfoSet& operator= (NodeInfoSet const& c ) ;
} ;




NamespaceEnd
